# -*- coding: utf-8 -*-
__author__ = '歆瑶'
import re
class Common:
    def __init__(self):
       pass

    def escape_single_quotation(self,string_text):
       tmp= re.sub('\'',"'",string_text)
       str= re.sub("'","\\'",tmp)
       return  str
       
    def decode_utf8(self,res_content):
        t=res_content.decode("utf-8")
        return  t

if __name__=='__main__':
     t="ttt\'f\'f'"
     print Common().escape_single_quotation(t)